package com.sky.service.impl;

import com.sky.domain.LoginForm;
import com.sky.domain.Teacher;
import com.sky.mapper.TeacherMapper;
import com.sky.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 尹稳健~
 * @version 1.0
 */
@Service
@Transactional
public class TeacherServiceImpl implements TeacherService {

    @Autowired
    private TeacherMapper teacherMapper;


    public Teacher login(LoginForm loginForm) {
        return teacherMapper.login(loginForm);
    }

    public void updatePassword(Teacher teacher) {
        teacherMapper.updatePassword(teacher);
    }

    public List<Teacher> getTeacherList(Teacher teacher) {
        return teacherMapper.getTeacherList(teacher);
    }

    public void addTeacher(Teacher teacher) {
        teacherMapper.addTeacher(teacher);
    }

    public Teacher getTeacherById(Teacher teacher) {
        return teacherMapper.getTeacherById(teacher);
    }

    public void editTeacher(Teacher teacher) {
        teacherMapper.editTeacher(teacher);
    }

    public void deleteTeacher(Integer[] ids) {
        teacherMapper.deleteTeacher(ids);
    }


}
